/* Filtro FIR sencillo */
#include <stdio.h>

#define N 4
#define M 8
float FIR[M-N+1];

float X[M]={1.0,2.0,3.0,4.0,3.0,2.0,1.0,2.0};
float C[N]={0.25,0.25,0.25,0.25}; 


int main()
{ 
  int i,j;
  for (j=0;j<=M-N;j++) {
     FIR[j] = 0.0;
     for (i=0;i<N;i++) { 
       FIR[j] += C[i]*X[j+i];
     }
/*     printf("%f\n",FIR[j]); */
  }
}
